import React, { Component } from 'react'
import qcevents from '../utils/qcevents'
 class Bottom extends Component {
   state = {
       index:0
   }
   componentDidMount(){
       qcevents.addListener("zhao",this.fn)
   }
   fn = (data) => { // 这个函数接收得参数就是兄弟组件传过来的数据
        console.log(data);
        this.setState({
            index:data
        })
   }
  render() {
    console.log(this.props)
    return (
      <div>
          {
              this.props.send[this.state.index].con
          }
      </div>
    )
  }
}

export default Bottom